<?php echo $this->fetch('about.header.html'); ?>
<DIV class="content_bg">
<div class="ABanner" style="background:url(<?php echo $this->_var['adver_list']['ad_img']; ?>) no-repeat top center;"></div>
<div class="ContentAbout">
 <div class="ContentLeft">
  <div class="Lefttop"></div>
  <div class="Leftbody">
  <div class="L2">
   <?php echo $this->fetch('kd_order.yundanhaobox.html'); ?>
  </div>    
  <div class="Lbo"></div>
  </div>
 </div>
 <div class="ContentRight">
 <div class="padding">
   <div class="location"><img src="<?php echo $this->res_base . "/" . 'images/about/about_content_home.gif'; ?>" /> 当前位置：<?php $_from = $this->_var['_curlocal']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'lnk');$this->_foreach['v'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['v']['total'] > 0):
    foreach ($_from AS $this->_var['lnk']):
        $this->_foreach['v']['iteration']++;
?><?php if ($this->_var['lnk']['url']): ?><a href="<?php echo $this->_var['lnk']['url']; ?>"><?php echo htmlspecialchars($this->_var['lnk']['text']); ?></a><?php if (! ($this->_foreach['v']['iteration'] == $this->_foreach['v']['total'])): ?>&nbsp;&gt;&nbsp;<?php endif; ?><?php else: ?><?php echo htmlspecialchars($this->_var['lnk']['text']); ?><?php endif; ?><?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?></div>
   <div class="Atext" style="padding-top:15px">
   <div class="text_title"><img src="<?php echo $this->res_base . "/" . 'images/about/wuliu_iocn.jpg'; ?>" align="absmiddle" /> 有时需要查询第三方快递公司的物流状态，因此查询较慢，请耐心等待或可以<a href="<?php echo url('app=kd_order'); ?>?ydh=<?php echo $this->_var['get_ydh']; ?>&lx=lcj"><strong>使用百度查询</strong></a>。</div>
  <?php $_from = $this->_var['yundan_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['list']):
?>
  <table class="table_wuliu table-hover">
    <thead>
        <tr><th colspan="2" align="left"><img src="<?php echo $this->res_base . "/" . 'images/about/wuliu_iocn.gif'; ?>" align="absmiddle" /> <?php echo $this->_var['list']['yundanhao']; ?></th></tr>
    </thead>
    <tbody>
      <?php if ($this->_var['list']['wuliu']): ?>
      <?php $_from = $this->_var['list']['wuliu']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'list_second');if (count($_from)):
    foreach ($_from AS $this->_var['list_second']):
?>
      <tr class="odd">
        <td align="center" valign="middle" width="170"><?php echo local_date("Y-m-d H:i:s",$this->_var['list_second']['addtime']); ?></td>
        <td align="left" valign="middle"><?php echo $this->_var['list_second']['yudan_text']; ?></td>
      </tr>
      <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
      <?php else: ?>
      <tr class="odd">
        <td align="center" valign="middle" width="170"><?php echo local_date("Y-m-d H:i:s",$this->_var['list']['addtime']); ?></td>
        <td align="left" valign="middle">暂无物流信息</td>
      </tr>          
      <?php endif; ?>
      <?php if ($this->_var['list']['expressNo']): ?>
      <tr class="odd" id="query_<?php echo $this->_var['key']; ?>">
        <td align="center" valign="top" width="170" style="line-height:20px"><strong><?php echo $this->_var['list']['express']; ?></strong><br /><?php echo $this->_var['list']['expressNo']; ?><br /><p style="padding:15px 0 8px 0">物流情况:</p></td>
        <td align="left" valign="top">
        <?php if ($_GET['lx'] == 'lcj'): ?>
        由于查询不到快递信息或查询太慢，已使用百度查询：<br>
        <iframe src="http://www.baidu.com/baidu?word=<?php echo $this->_var['list']['express']; ?> <?php echo $this->_var['list']['expressNo']; ?>" width="100%" height="543" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>
        <?php else: ?>
        <div id="wuliujiekou<?php echo $this->_var['key']; ?>"><font color="#FF0000">请稍等，获取物流中...</font></div>
		<script type="text/javascript">
		$.get("data/jiekou/interface.php",{ "call": "yundan","express": "中通快递", "content": "<?php echo $this->_var['list']['expressNo']; ?>"},function (result){ 
		if(result.status=='OK'){
			var objson = eval("("+ result['result'] +")");
			if(typeof(objson['traces'])=='undefined'){
				$("#query_<?php echo $this->_var['key']; ?>").hide();
			}else{
			    $("#wuliujiekou<?php echo $this->_var['key']; ?>").html("");
				$.each(objson['traces'],function(k){
				  if(objson['traces'][k]['acceptTime']=="" && objson['traces'][k]['remark']==""){
					  $("#query_<?php echo $this->_var['key']; ?>").hide();
				  }
				  $("#wuliujiekou<?php echo $this->_var['key']; ?>").append('<li><p>'+objson['traces'][k]['acceptTime']+'</p>'+objson['traces'][k]['remark']+'</li>'); 
				}); 
			}
		}
		},"json");        
        </script>
        <?php endif; ?>
        </td>
      </tr>  
      <?php endif; ?>  
    </tbody>
  </table>
  <?php if ($this->_var['count_yudan']['substr_count']): ?><div class="text_title">» 查询到 <strong><?php echo $this->_var['count_yudan']['count']; ?></strong> 个单号(共查<?php echo $this->_var['count_yudan']['substr_count']; ?>个)，如果以上某个单号没显示，可能是单号错误或者过滤只显示20条记录！</div><?php endif; ?>
  <?php endforeach; else: ?>
  <div style="border:1px dashed #ddd;padding:10px 0; margin:10px auto;width:100%; text-indent:15px;font-size:16px;color:#ed5736;">非常抱歉，您的查询的单号无记录!</div>
  <?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
  
<script type="text/javascript"> 
$(document).ready(function(){
  $(".list:odd").css("background-color","#fafafa");
});
</script>
   </div>
  </div>
 </div>
 <div class="clear"></div>
 </div>
</div>
<?php echo $this->fetch('footer_jiandan.html'); ?>